package com.woniuxy.propertyjava.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageBean<T> {
    private List<T> beanList;  //当前页数据的集合
    private int pageIndex;     //索引页
    private int pageSize;      //页面显示数据数量
    private int totalRecode;   //数据总条数
    private int totalPage;     //总页数
    public int getTotalPage() {
        return totalRecode%pageSize==0?totalRecode/pageSize:totalRecode/pageSize+1;
    }


}

